#
#	File:		FeatureList
#
#	Contains:	This script is a wrapper for ParseFeatures for specific builds. The
#				main thing that it does is strip ": ROM" from the feature list.
#				The script part should be rolled into ParseFeatures.
#
#				PLEASE try to keep this in sync with BBSStartup
#
#	Written by:	Kurt Clark.
#
#	Copyright:	 1992-1993 by Apple Computer, Inc., all rights reserved.
#
#	Change History (most recent first):
#
#	  <SM25>	12/13/93	PN		Roll in KAOs and Horror changes to support Malcom and AJ
#									machines
#	  <SM24>	11/10/93	fau		Update from SuperMunggio <SMG2-3>.
#	  <SMG3>	 9/23/93	chp		Add TNT debug flag pseudo-feature.
#	  <SMG2>	 8/25/93	chp		Added hasGrandCentral feature for TNT interrupt/DMA controller.
#	  <SM22>	 11/9/93	KW		somehow removed DBLite...put back in.
#	  <SM21>	 11/9/93	KW		added forSTP601 and forSTPnop
#	  <SM20>	 11/8/93	SAM		Added hadROMGibbly.
#	  <SM19>	 10/6/93	RC		Rolled in change from MC Jesus which adds the flag forPDMProto
#	   <MC2>	 10/4/93	RC		Add forPDMProto to list (to support EVT2/3 PDM and EVT1 Cold
#									Fusion)
#	  <SM18>	 9/30/93	IH		Split hasDisplayMgr feature into hasDisplayMgr and
#									hasDisplayMgrWindows. This allows the display manager in the
#									gibbly without patching out the window manager on PDM.
#	  <SM17>	 9/25/93	PN		Adding DBLite feature
#	  <SM16>	  9/2/93	SKH		change hasSCSIDiskMode to hasSCSIDiskModeFeature
#	  <SM15>	  8/4/93	JDR		removed hasNewSoundMgr since there is only the one version, and
#									that is 3.0.
#	  <SM14>	  8/3/93	BH		Added hasManEject
#	  <SM13>	 7/21/93	RC		Changed PowerPCNativeComponents to SupportNativeComponents
#	  <SM12>	 7/14/93	RC		added hasAMIC feature flag
#	  <SM11>	  7/7/93	RC		added feature flag for native component Mgr support
#	  <SM10>	  7/1/93	BT		Add hasCacheTypeCPU for Figment.
#	   <SM9>	 6/28/93	PN		Add feature hasMACE into the list
#	   <SM8>	  6/6/93	BT		Add hasRISCV0ResMgrPatches to featurelist.
#	   <SM7>	 5/30/93	SAM		Moved ROM_EM to Tidbits.
#	   <SM6>	 5/21/93	CSS		Add international features: hasDoubleByte, Script_Char_Extra,
#									hasPenFraction, hasFullKerning, hasGlyphState.
#	   <SM5>	 5/20/93	BT		Update build to only include Figment under conditional compile
#									flag "hasNewHeapMgr"
#	   <SM4>	 3/31/93	kc		Add code to remove case dependencys from command line arguments.
#	   <SM3>	 3/27/93	IH		Add hasDisplayMgr to available features.
#	   <SM2>	  3/5/93	RC		added hasCAppleTalkInROM for PDM version of AppleTalk (all
#									written in C)
#	  <SM12>	  2/5/93	SAM		Removed RISC conditional.
#	  <SM11>	  2/2/93	GMR		Added hasSwim3 feature.
#	  <SM10>	12/17/92	RB		Added the features hasYMCA, hasHMC, hasCPUIDRegister.
#	   <SM9>	 12/8/92	RC		Added "RISC" to the FeatureList
#	   <SM8>	 12/3/92	RB		Added the feature has2MegROMOrMore.
#	   <SM7>	11/30/92	EH		Add hasPratt for the Blackbird memory controller chip.
#	   <SM4>	11/30/92	kc		Add forRomulator.
#	   <SM5>	11/29/92	PW		Removed the COUSIN_ITT feature (hasAsyncSCSI is all we need).
#	   <SM4>	11/24/92	RB		Added the feature hasROM_EM so it can be easily taken out.
#	   <SM3>	11/23/92	kc		Add DefineOverides as a second parameter.
#	   <SM2>	11/11/92	RB		Added the features hasSCSIDiskMode, hasAppleTalkInROM,
#									hasNewAge, hasVideoIn, hasAsyncSCSI, hasDSP and hasNewSoundMgr
#									COUSIN_ITT.
#
#
#

Set	AvailableFeatures  "hasROMGibbly			
						hasManEject				
						hasCacheTypeCPU			
						forPDMProto				
						hasAMIC					
						SupportNativeComponents	
						hasRISCV0ResMgrPatches	
						hasNewHeapMgr			
						hasPDMMaceEnet			
						hasMace					
						hasMixedMode			
						kHasNewFloppyDriver		
						nonVectorizedRom		
						hasSCSIDiskModeFeature	
						hasDataAccessPACK		
						hasSysSevenResources	
						hasVMinROM				
						has2MegROMOrMore		
						hasCAppleTalkInROM		
						hasAppleTalkInROM		
						hasNewAge				
						hasVideoIn				
						hasAsyncSCSI			
						hasDSP					
						BadBlockSparingEnabled	
						CubeE					
						ForROM					
						IopADB					
						LC930					
						DBLite					
						NewBuildSystem			
						OssADB					
						PadForOverpatch 		
						PwrMgrADB				
						ROMFastTraps			
						ROMinRAM				
						Supports24Bit			
						SystemSevenOrLater		
						SystemSixOrLater		
						TheFuture				
						ViaADB					
						forADBKeyboards 		
						forAppleTalk20			
						forCyclone				
						forLocalizability		
						forNonADBKeyboards		
						forPDMDebug 			
						forTNTDebug 			
						forRomulator			
						forSmurf				
						forSTP601				
						forSTP601v1				
						forSTPnop				
						has040MMU				
						hasADBKeyLayouts		
						hasASC					
						hasAliasMgr 			
						hasApple2Fonts			
						hasAppleEventMgr		
						hasBalloonHelp			
						hasBattery				
						hasCQD					
						hasCommToolbox			
						hasCPUIDRegister		
						hasDAFB					
						hasDisplayMgr			
						hasDisplayMgrWindows	
						hasDJMEMC				
						hasDataAccessMgr		
						hasEDisk				
						hasEclipseVIA2			
						hasEditionMgr			
						hasEgret				
						hasExtendedCharacterSet 
						hasFMC					
						hasGDU					
						hasGlue					
						hasGrandCentral			
						hasHarpoVIA 			
						hasHMC					
						hasIdle 				
						hasIopScc				
						hasIopSwim				
						hasJaws 				
						hasLCDScreen			
						hasMDU					
						hasMMU					
						hasMSC					
						hasMac2VIA2 			
						hasMagic				
						hasNetBoot				
						hasNiagra				
						hasNonADBKeyLayouts 	
						hasNormandy 			
						hasOrwell				
						hasOss					
						hasPSC					
						hasPictureUtilities 	
						hasPortableKeyLayouts	
						hasPowerMgr 			
						hasPratt	 			
						BlackBirdDebug	 		
						hasProtectedPRAM		
						hasPwrControls			
						hasPwrMgrClock			
						hasRBV					
						hasSCSI96				
						hasSWIM2				
						hasSwim3				
						hasSlotMgr				
						hasSonora				
						hasSplineFonts			
						hasTrueType2Byte		
						hasVDAC					
						hasVIAClock 			
						hasVISA2				
						hasVISADecoder			
						hasWaimeaVIA2			
						hasYMCA					
						isUniversal				
						nonSerializedIO 		
						onHafMac				
						onMac32 				
						onNuMac 				
						pre70					
						hasDoubleByte			
						Script_Char_Extra		
						hasPenFraction			
						hasFullKerning			
						hasGlyphState			
						useROMFonts				"


	If	"` ParseFeatures -a "{AvailableFeatures}" -f ": ROM {1}" `" =~ /': ROM '()1/
		Set Defines "{1}"
	Else
		Exit 1
	End

	For Override in {2}

		If "{Override}" =~ /()1=()2/
			Set Name {1}
			Set Value {2}
		Else
			Set Name {Override}
			Set Value TRUE
		End

		If {Value} =~ /true/
			Set Value TRUE
		Else If {Value} =~ /false/
			Set Value FALSE
		End

		If "{Defines}" =~ /()3{Name}=[ t]+()4/
			Set Defines "{3} {Name}={Value} {4}"
		Else
			Set Defines "{Defines} -d {Name}={Value}"
		End
	End

	Echo {Defines}

	Exit
